POST
/
public
/
v1
/
toptimize
/
forecasting
/
campaign
curl --request POST \
  --url https://api.topsort.com/public/v1/toptimize/forecasting/campaign \
  --header 'Content-Type: application/json' \
  --data '{
  "bids": {
    "inventory": [],
    "productIds": [
      "<string>"
    ]
  },
  "budget": {
    "amount": 1,
    "type": "daily"
  },
  "campaignType": "autobidding",
  "targetRoas": 1,
  "timeWindow": 7
}'
[
  {
    "forecastDate": "2025-01-15",
    "metrics": [
      {
        "metricName": "impressions",
        "values": {
          "forecastIntervalMax": 5600,
          "forecastIntervalMin": 4900,
          "forecastValue": 5250
        }
      },
      {
        "metricName": "clicks",
        "values": {
          "forecastIntervalMax": 1120,
          "forecastIntervalMin": 980,
          "forecastValue": 1050
        }
      },
      {
        "metricName": "purchases",
        "values": {
          "forecastIntervalMax": 112,
          "forecastIntervalMin": 98,
          "forecastValue": 105
        }
      }
    ]
  },
  {
    "forecastDate": "2025-01-16",
    "metrics": [
      {
        "metricName": "impressions",
        "values": {
          "forecastIntervalMax": 5750,
          "forecastIntervalMin": 5050,
          "forecastValue": 5400
        }
      },
      {
        "metricName": "clicks",
        "values": {
          "forecastIntervalMax": 1150,
          "forecastIntervalMin": 1010,
          "forecastValue": 1080
        }
      },
      {
        "metricName": "purchases",
        "values": {
          "forecastIntervalMax": 115,
          "forecastIntervalMin": 101,
          "forecastValue": 108
        }
      }
    ]
  }
]

Body

application/json

Request model for campaign forecasts with the new structure.

Response

200
application/json

Successful Response

The response is of type DailyForecast · object[].